package com.tomowork.utils;

import com.fasterxml.jackson.databind.ObjectMapper;

public class JacksonUtil {
    public static String beanToJson(Object obj){
        ObjectMapper objectMapper = new ObjectMapper() ;
        try{
            return objectMapper.writeValueAsString(obj) ;

        }catch (Exception e){
            e.printStackTrace();

        }
        return null ;
    }

}
